﻿@inject IStringLocalizer<DialogSearchDialog> Localizer

<Button OnClick="@OnSearchDialogClick">@Localizer["SearchDialogButton"]</Button>

@code {
    [Inject]
    [NotNull]
    private DialogService? DialogService { get; set; }

    private async Task OnSearchDialogClick()
    {
        var option = new SearchDialogOption<Foo>()
        {
            Title = "Search popup",
            Model = new Foo(),
            RowType = RowType.Inline,
            ItemsPerRow = 2,
        };
        await DialogService.ShowSearchDialog(option);
    }
}
